<script type="text/javascript" language="javascript">
    (function($) {
        /*whatever jQuery stuff*/
        $(function(){
			//Colorbox
			$('a[rel="gallery"]').colorbox({
				onComplete: function(){
					$('#cboxTitle').html('<iframe src="<?php echo base_url("truehitsstat.php");?>" width="14" height="17" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true"></iframe>');
				}
			});
        });
    })(jQuery);
</script>
			<ul class="gallery_block_style2">	
			<?php if(!empty($dataGalleryImage)):?>
				<?php foreach($dataGalleryImage as $key => $value):?>
				<?php if($key%5 == 0 && $key !=0) echo '</ul><ul class="gallery_block_style2" '.(ceil($key/45) > 1 ? 'style="display:none;"':'').'>';?>
				<li>
					<a href="<?php echo image_asset_url('../uploads/gallery/images/watermark/'.@$value->gallery_file_name.'.'.@$value->gallery_file_ext);?>" rel="gallery">
						<div class="image">
							<?php echo exec_image(array(
								'folder' => 'gallery',
								'dimension' => '120x120',
								'file_name' => @$value->gallery_file_name.'.'.@$value->gallery_file_ext,
								'title' => '',
								'alt' => ''	
								)
							);?>
						</div>
					</a>
				</li>
				<?php endforeach;?>
			<?php else:?>
			<li class="empty">ไม่มีข้อมูล</li>
			<?php endif;?>	
			</ul>	
			<?php if(!empty($dataGalleryImage) && count($dataGalleryImage) > 50):?>
			<a href="javascript:void(0);" onclick="javascript:loadMore(this,10);" class="btnLoadMore">ดูเพิ่มเติม &raquo;</a>
			<?php endif;?> 		
		<!--<div class="pager"><?php //echo $pager;?></div>-->
		<div id="gallery_bar_bottom">
			<?php if(!empty($dataGalleryPrev)):?>
			<div class="floatLeft">
				<a href="<?php echo base_url().'archives/'.$dataGalleryPrev->gallery_id.'-'.seo_url($dataGalleryPrev->gallery_name);?>">
					<div class="bold">&laquo; อัลบั้มที่เก่ากว่า</div>
				</a>
			</div>
			<?php endif;?>
			<?php if(!empty($dataGalleryNext)):?>
			<div class="floatRight">
				<a href="<?php echo base_url().'archives/'.$dataGalleryNext->gallery_id.'-'.seo_url($dataGalleryNext->gallery_name);?>">
					<div class="bold">อัลบั้มที่ใหม่กว่า &raquo;</div>
				</a>
			</div>
			<?php endif;?>
		</div>		